/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package net.gis.eemc.web;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

import java.util.List;
import java.util.ArrayList;

import net.gis.eemc.domain.Faculty;
import net.gis.eemc.service.FacultyServiceImpl;

/**
 *
 * @author Sergey
 */
@ManagedBean(name = "facultiesBean")
@ViewScoped
public class FacultiesBean {

    List<Faculty> faculties = null;
    private FacultyServiceImpl facSrv = null;

    private void fillFacList() {
        faculties = facSrv.getFaculties();
    }

    /** Creates a new instance of FacultiesBean */
    public FacultiesBean() {
        facSrv = new FacultyServiceImpl();

        fillFacList();
    }

    public List<Faculty> getFaculties() {
        return faculties;
    }
}
